import url from "url";
const request = {
  get query() {
    // ctx.request.query  -> this (ctx.request)
    // ctx.request.req -> this.req

    return url.parse(this.req.url, true).query;
  },
  get path() {
    // ctx.request.query  -> this (ctx.request)
    // ctx.request.req -> this.req

    return url.parse(this.req.url).pathname;
  },
};
export default request;
